package zzy;

class Point {
	double x, y, z;
	public Point(double x, double y, double z) {
		this.x = x;
		this.y = y;	
		this.z = z;
	}
	public double getDistance(Point p) {
		return Math.sqrt((x - p.x) * (x - p.x) + (y - p.y) * (y - p.y) + (z - p.z)*(z - p.z));
	}
}
class Test {
	public static void main(String[] args) {
		Point p = new Point(3.0,4.0,5.0);
		Point origin = new Point(0.0,1.0,5.0);
		System.out.println(p.getDistance(origin));
	}
}